package edu.its.dreamteam.daf.dao.ibatis;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import edu.its.dreamteam.daf.beans.SellPlayer;
import edu.its.dreamteam.daf.dao.ISellPlayerDao;

public class SellPlayerDaoImpl extends BaseDaoImpl implements ISellPlayerDao {

	@Override
	protected String getNamespace() {
		return "SellPlayer";
	}

	public List<SellPlayer> getSellPlayerByTeam(String id_team, String id_room) {
		try {
			Map map = new HashMap();
			map.put("id_team",id_team);
			map.put("id_room",id_room);
			
			List<SellPlayer> list = getSqlMapClientTemplate().queryForList(getNamespace()+".getSellPlayerByTeam", map);
			return list;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

	public List<SellPlayer> getSellPlayerNotTeam(String id_team, String id_room) {
		try {
			Map map = new HashMap();
			map.put("id_team",id_team);
			map.put("id_room",id_room);
			List<SellPlayer> list = getSqlMapClientTemplate().queryForList(getNamespace()+".getSellPlayerNotTeam", map);
			return list;
		} catch (Exception e) {
			e.printStackTrace();
		}
		return null;
	}

}
